from tkinter import * 
n1 = int(input())
n2 = int(input())
k = int(input())
if n1+20*k <= 500 and n2+30*k <= 500 and n1 > 0 and n2 > 0 :
    root = Tk() 
    root.title("IT")
    root.geometry("500x500")
    canvas = Canvas(bg = 'white', width = 500, height = 500) 
    canvas.pack(anchor = CENTER, expand = 1)
    canvas.create_rectangle(n1, n2, n1 + 10*k, n2 + 20*k, fill = "red", outline = "red", width = 4)
    canvas.create_rectangle(n1 + 10*k, n2 + 10*k, n1 + 20*k, n2 + 30*k, fill = "red", outline = "red", width = 4)
    root.mainloop()
else:
    print("Размер фигуры превышает максимальный размер поля")

